package cn.edu.scau.sec.caixiaoqing.client;

import cn.edu.scau.sec.caixiaoqing.singleton.Chairman;
import cn.edu.scau.sec.caixiaoqing.singleton.Marshall;

/**
 * 测试类
 */
public class SingletonClient {
    public static void main(String[] args) {
        testChairman();
        testMarshalls();

    }

    public static void testChairman(){
        Chairman chairman = Chairman.getInstance();
        Chairman.printChairman(chairman);
        Chairman chairman1 = Chairman.getInstance();
        Chairman.printChairman(chairman1);
        Chairman.compChairman(chairman,chairman1);
    }

    public static void testMarshalls(){
        Marshall marshall1 = Marshall.getInstance("刘伯承");
        Marshall.printMarshalls();
        Marshall marshall2 = Marshall.getInstance("朱德");
        Marshall.printMarshalls();
        Marshall marshall3 = Marshall.getInstance("彭德怀");
        Marshall.printMarshalls();
        Marshall marshall4 = Marshall.getInstance("林彪");
        Marshall.printMarshalls();
        Marshall marshall5 = Marshall.getInstance("刘伯承");
        Marshall.printMarshalls();
        Marshall marshall6 = Marshall.getInstance("贺龙");
        Marshall.printMarshalls();
        Marshall marshall7 = Marshall.getInstance("陈毅");
        Marshall.printMarshalls();
        Marshall marshall8 = Marshall.getInstance("罗荣桓");
        Marshall.printMarshalls();
        Marshall marshall9 = Marshall.getInstance("徐向前");
        Marshall.printMarshalls();
        Marshall marshall10 = Marshall.getInstance("聂荣臻");
        Marshall.printMarshalls();
        Marshall marshall11 = Marshall.getInstance("叶剑英");
        Marshall.printMarshalls();
    }
}
